<?php
namespace App\Http\Middleware;
use Closure;

class Activity
{


    //前置操作
    public  function handle($request, Closure $next)
    {

        if (time() < strtotime('2019-10-31'))
        {
            return redirect('api/activity0');

        }else
        {
            return $next($request);
        }
    }


    //后置
//    public  function handle($request, Closure $next)
//    {
//        $response = $next($request);
//        var_dump($response);
//        return redirect('api/activity0');
//    }
}